<%--
  Created by IntelliJ IDEA.
  User: 30462
  Date: 2023/12/18
  Time: 12:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>登陆页面</title>
    <link rel="stylesheet" href="static/CSS_login/bootstrap.min.css">
    <link rel="stylesheet" href="static/CSS_login/fonts.css">
    <link rel="stylesheet" href="static/CSS_login/styles.css">
</head>
<body>
<div class="wrapper">
    <div class="container d-flex flex-column flex-lg-row">
        <div class="lbg01"></div>
        <div class="lbg02"></div>
        <div class="con-left d-flex flex-lg-row-fluid flex-center w-bfb-60 pos-relative">
            <img src="static/image/5g.png" />
            <div class="lbg03"></div>
        </div>
        <div class="con-right d-flex flex-lg-row-fluid w-bfb-40  flex-column bgi-position-center">

            <form class="sign-in-form" id="loginForm">
                <div class="text-header">欢迎登录本超市商品信息系统</div>
                <div class="sub-title m-t-10 m-b-30"></div>
                <div class="form-group mb-3 mt-4">
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text"><i class="fa fa-envelope"></i></span>
                        </div>
                        <input class="form-control form-control-lg" type="text" placeholder="用户名" id="username" name="username" required="">
                        <div class="input-group-append"></div>
                    </div>
                </div>
                <div class="form-group mb-3 mt-4">
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text"><i class="fa fa-lock"></i></span>
                        </div>
                        <input class="form-control form-control-lg" type="password" placeholder="密码" id="password" name="password" required="">
                        <div class="input-group-append"></div>
                    </div>
                </div>


                <div class="form-row text-nowrap d-flex my-4">
                    <div class="col d-flex align-items-center">
                        <div class="ckbox remuser">

                        </div>
                    </div>

                </div>
                <button class="btn btn-main shadow-sm btn-block" type="submit">点 击 登 录</button>

            </form>

        </div>
    </div>
</div>

<script>
    document.getElementById('loginForm').addEventListener('submit', function(event) {
        event.preventDefault(); // 阻止表单默认提交行为

        var username = document.getElementById('username').value;
        var password = document.getElementById('password').value;

        if (username === 'admin' && password === '123456') {
            window.location.href = 'index.html'; // 跳转到index.html页面
        } else {
            alert('账号或密码错误，请重试！');
        }
    });
</script>
<script src="static/js_login/bootstrap.min.js"></script>
<script src="static/js_login/jquery.min.js"></script>
</body>
</html>

